using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Input;

namespace One_Crappy_RPG
{
    public class TitleScreen : GameScreen
    {
        ContentManager content;

        public TitleScreen()
        {
        }

        public override void Initialize()
        {
            base.Initialize();
        }

        public override void LoadContent()
        {
            if (content == null)
            {
                content = ScreenManager.content;
            }
            //background = content.Load<Texture2D>("Content\\Graphics\\GameStateSample");
            base.LoadContent();
        } 

        public override void HandleInput()
        {
            InputManager.Update();

            if (InputManager.WasNewKeyPress(Keys.C))
            {

            }
            else if (InputManager.WasNewKeyPress(Keys.N))
            {
                isActive = false;
                hasFocus = false;

                ScreenManager.AddScreen(new WorldScreen());
                ScreenManager.RemoveScreen(this);
            }
        } 

        public override void UnloadContent()
        {
        }

        public override void Draw(GameTime gameTime)
        {
            ScreenManager.spriteBatch.Begin();
            //ScreenManager.spriteBatch.Draw(background, new Rectangle(0, 0, ScreenManager.GraphicsDevice.Viewport.Width, ScreenManager.GraphicsDevice.Viewport.Height),null, Color.White,0,new Vector2(0,0),SpriteEffects.None,base.screenDepth);
            ScreenManager.spriteBatch.DrawString(ScreenManager.font, "One Crappy RPG", new Vector2(250, 100), Color.Gold, 0, new Vector2(), 1, SpriteEffects.None, base.screenDepth);
            ScreenManager.spriteBatch.DrawString(ScreenManager.font, "(N)ew Game", new Vector2(250, 300), Color.White, 0, new Vector2(), 1, SpriteEffects.None, base.screenDepth); 
            ScreenManager.spriteBatch.DrawString(ScreenManager.font, "(C)ontinue", new Vector2(250, 320), Color.White, 0, new Vector2(), 1, SpriteEffects.None,base.screenDepth);
            ScreenManager.spriteBatch.End();
            base.Draw(gameTime);
        } 

        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime); 
        }
    }
}
